package com.jlxy.chen.eroad;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends Activity implements Callbacks {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public void onItemSelected(Integer id, Bundle bundle) {
        Intent intent = null;
        switch((int)id){
            case 0:
                intent = new Intent(this,ViewItem.class);
                intent.putExtra("action", "viewSucc.jsp");
                startActivity(intent);
            case 1:

                intent = new Intent(this, ViewItem.class);

                intent.putExtra("action", "viewFail.jsp");
                startActivity(intent);
                break;

            case 2:

                intent = new Intent(this, OrderKindActivity.class);
                startActivity(intent);
                break;

            case 3:

                intent = new Intent(this, OrderItemActivity.class);
                startActivity(intent);
                break;

            case 4:

                intent = new Intent(this, ChooseKindActivity.class);
                startActivity(intent);
                break;

            case 5:

                intent = new Intent(this, ViewBidActivity.class);
                startActivity(intent);
                break;
        }
    }
}
